package com.teamwings.modules.design.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class FormTableVo {

    @TableId(value = "ID")
    private String id;

    @TableField("TABLE_CATE_ID")
    private String tableCateId;

    @TableField("TABLE_HEAD_ID")
    private String tableHeadId;

    @TableField("TABLE_CNAME")
    private String tableCname;

    @TableField("TABLE_NAME")
    private String tableName;

    @TableField("TABLE_VERSION")
    private Integer tableVersion;

    @TableField("TABLE_TXT")
    private String tableTxt;

    @TableField("TABLE_SOURCE_TYPE")
    private String tableSourceType;

    /**
     * 自动 type = 0, 无数据源 type = 1  外部数据来源 type = 2
     */
    @TableField("SOURCE_TYPE")
    private String sourceType;

    @TableField("TABLE_SOURCE")
    private String tableSource;

    @TableField("TABLE_CODE")
    private String tableCode;

    @TableField("TABLE_FIELDS")
    private String tableFields;

    @TableField(value = "CREATE_BY", fill = FieldFill.INSERT)
    private String createBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @TableLogic
    private Integer deleted;

}
